import createAxios from '/@/utils/axios'

// 合并订单
export const controllerUrl = '/admin/goods.Goods/'

//导入商品
export function importApi(data: anyObj) {
    return createAxios({
        url: controllerUrl + 'import',
        method: 'post',
        data: data,
    },{
        showSuccessMessage: true,
    })
}
//收藏商品
export function collectionApi(goods_id: number) {
    return createAxios({
        url: controllerUrl + 'collection',
        method: 'get',
        params: {
            goods_id: goods_id,
        },
    },{
        showSuccessMessage: true,
    })
}
// 取消收藏商品
export function cancelCollectionApi(goods_id: number){
    return createAxios({
        url: controllerUrl + 'cancelCollection',
        method: 'get',
        params: {
            goods_id: goods_id,
        },
    },{
        showSuccessMessage: true,
    })
}